package com.amat0urheu.service;


import com.amat0urheu.pojo.ReturnRes;
import com.amat0urheu.pojo.race.Race;

public interface RaceService {

    ReturnRes getRaceView(int pageSize, int pageNum);

    int removeRacebyId(Integer rid);


    ReturnRes getRaceInfoById(int rid);

    ReturnRes getAllparticipants( Integer rid,Integer pageSize, Integer pageNum);

    ReturnRes getCurrentRanking(Integer rid);

    ReturnRes submitRaceFlag(String name, Integer rid, String flag);

    ReturnRes addRace(Race race,Integer raceScene);

    ReturnRes createRaceVm(Integer rId,int count);

    ReturnRes getRaceScenes();

    ReturnRes getAllRaceVms(int pageSize, int pageNum);

//    ReturnRes getRaceVmsForTeam(String id, String name);

    ReturnRes getSubmitFlagLogs(int pageSize, int pageNum);

    ReturnRes getTeamRanking(int pageSize, int pageNum,Integer rid);

    ReturnRes removeRankingOfRace(String rid);

    ReturnRes getRaceViewforUser(Integer pageSize, Integer pageNum);

    ReturnRes getEndRaceForUser(Integer pageSize, Integer pageNum);

    ReturnRes getuserParticipated(Integer rid,String  user);

    ReturnRes joinRace(Integer rid, String name);

    ReturnRes getRaceVmofTeam(String name,Integer rid);

    ReturnRes submitApplyRaceVm(String name, Integer rid);

    ReturnRes submitApplyRaceVmClient(String name, Integer rid);

    ReturnRes createClientVm(Integer rId, Integer num);

    ReturnRes releaseRaceVm(String name, Integer rid);

    ReturnRes searchRaceByPage(String key, String value, int pageNum, int pageSize);

    ReturnRes searchRaceVm(String key, String value, int pageNum, int pageSize);

    ReturnRes searchFlagLog(String key, String value, int pageNum, int pageSize);

    ReturnRes getFlagofTeam(Integer rid, Integer pageSize, Integer pageNum);

    ReturnRes getFlagofvM(int pageSize, int pageNum);

    ReturnRes searchFlagofVm(String key, String value, int pageNum, int pageSize);

    ReturnRes getRacevmCount();

    ReturnRes updateRace(Race race, Integer sceneId);

    ReturnRes getRaceInfo(int rid);

    ReturnRes releaseRaceAllVms();
}
